<%@page contentType="text/html;charset=utf-8" %>
<%@taglib prefix="s" uri="/struts-tags" %> 
<script type="text/javascript">
function manage_product_showcode(productId,id)
{
	var url = "mg/productcode/show.do";
    var content = "model.id=" + id 
			      +"&model.productId="+productId;
    var objectid = "manage_product_showcode";
    sendXMLHttpRequest(url, content, objectid); 
}
function manage_channel_list(cid)
{
	var url = "cm/project/list.do";
    var content = "channel.id=" + cid;
    var objectid = "content";
    sendXMLHttpRequest(url, content, objectid); 
}


function manage_sp_listfilter(spId,id,codeType)
{
	var url = "mg/filter/list.do";
    var content = "model.spCodeId=" + id 
    			  +"&spId="+spId
    			  +"&codeType="+codeType;
    var objectid = "content";
    sendXMLHttpRequest(url, content, objectid); 
}
function manage_sp_listconfirm(spId,id,codeType)
{
	var url = "mg/confirm/list.do";
    var content = "model.spCodeId=" + id 
    			  +"&spId="+spId
    			  +"&codeType="+codeType;
    var objectid = "content";
    sendXMLHttpRequest(url, content, objectid); 
}
function manage_sp_listbantime(spId,id,codeType)
{
	var url = "mg/bantime/list.do";
    var content = "model.spCodeId=" + id 
    			  +"&spId="+spId
    			  +"&codeType="+codeType;
    var objectid = "content";
    sendXMLHttpRequest(url, content, objectid); 
}
function cm_listfeedesign(id)
{
	 var url = "mg/productcode/list.do";
	    var content = "model.productId=" + id;
	    var objectid = "content";
	    sendXMLHttpRequest(url, content, objectid); 
}
</script>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="5"></td>
    <td>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="5"></td>
      </tr>
      <tr>
        <td height="25" class="t1">
          <img src="images/small0.gif" width="14" height="12"> 您现在的位置&gt;&gt;厂商管理&gt;&gt;计费设计</td>
      </tr>
    </table>
  <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="5"></td>
    <td>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td>
        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td><img src="images/table_top_left.jpg" width="20" height="15" /></td>
            <td><img src="images/table_top_bg.jpg" width="770" height="15"/></td>
            <td align="right">
              <img src="images/table_top_right.jpg" width="20" height="15" /></td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td height="25" class="table_blue">
        <input id="spId" type="hidden"  value="<s:property value="spInfo.id" />"/>
        <input id="spName" type="hidden" value="<s:property value="spInfo.spName" />"/>
          <strong><img src="images/dot.jpg" width="13" height="9">计费列表(厂商：<s:property value="channel.name" />&nbsp;
          																	项目：<s:property value="project.name" />)</strong>
          																	<input type="hidden" name="project.name" id="project.name" value="<s:property value="project.name" />"/>
          <span style="float:right;color:#000000;">        
          <button id="btn2" dojoType="dijit.form.Button" 
            onclick="manage_product_showcode('<s:property value="model.productId" />','-1');">新增</button>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
          </span>
          </td>
      </tr>   
      <tr>
        <td>
        <table width="100%" border="0" cellspacing="0" cellpadding="0" 
           style="word-break:break-all;">
          <tr>
            <td align="center" class="table_g1" width="8%">ID</td>
            <td align="center" class="table_g2" width="7%">通道</td>
            <td align="center" class="table_g2" width="7%">业务线</td>
	        <td align="center" class="table_g2" width="7%">订购方式</td>
	        <td align="center" class="table_g2" width="7%">代码名称</td>
	        <td align="center" class="table_g2" width="15%">计费链接</td>
	        <td align="center" class="table_g2" width="25%">开通省份</td>
	        <td align="center" class="table_g2" width="5%">状态</td>
	        <td align="center" class="table_g2" width="25%">&nbsp;</td>
	      </tr>
      
	      <s:if test="list.size()>0" >
	        <s:iterator value="list" status="stat" >
	        <tr onmouseover="this.style.background='#c0c0c0';" 
	            onmouseout="this.style.background='#ffffff';"> 
              <td class="table_w1" align="center"><s:property value="id" /></td>
              <td class="table_w1" align="center"><s:property value="spName" /></td>
	          <td class="table_w2" align="center"><s:property value="%{getConstantString('code type', codeType)}" /></td>
              <td class="table_w2" align="center"><s:property value="%{getConstantString('order type', orderType)}" /></td>
              <td class="table_w2" align="center"><s:property value="productCodeName" /></td>
	          <td class="table_w2" align="center"><s:property value="feeLink" /></td>
	          <td class="table_w2" align="center"><s:property value="%{provinceToNameString(productCodeOpenProvince)}" /></td>
	          <td class="table_w2" align="center"><s:property value="%{getConstantString('code status',productCodeStatus)}"/></td>
	          <td class="table_w2" align="center">
	            <a href="javascript:void(0);" 
	              onclick="manage_product_showcode('<s:property value="model.productId" />','<s:property value="id" />');">设置</a>&nbsp;
	        </tr>    
	        
	        </s:iterator>
	      </s:if>
	      </table>
	    </td>
	  </tr>
      <tr>
      <td class="table_w1" align="center" height="30">
        <button id="btn1" dojoType="dijit.form.Button"
            onclick="return manage_channel_list('<s:property value="channel.id"/>');">返回</button>
      </td>      
     </tr>
      <tr> 
        <td background="images/table_bom_bg.jpg">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>
              <img src="images/table_bom_left.jpg" width="20" height="15"></td>
            <td></td>
            <td align="right">
              <img src="images/table_bom_right.jpg" width="20" height="15"></td>
          </tr>
          </table>
        </td>
      </tr>
    </table>  
  </td>
  <td width="5"></td>
  </tr>
  </table>
  <div id="manage_product_showcode"></div>